package com.stx.day0922;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

/**
 * packageName com.stx.day0922
 *
 * @author YangYi
 * @className ExceptionDemo01
 * @date 2025/9/22
 * @description TODO
 */
public class ExceptionDemo01 {

    /**
     * 打开文件流
     * @param path
     * @throws FileNotFoundException
     */
    public static void openFile(String path) throws FileNotFoundException {
        FileInputStream fileInputStream = new FileInputStream(path);
    }

    public static void main(String[] args){
        String path = "D:\\移通学院\\双体\\工作\\四期\\四期六部\\周总结\\第三周1";
        try{
            openFile(path);
        }catch (FileNotFoundException e){
            System.out.println("文件路径不正确");
            System.out.println(e.getMessage());
            System.out.println(e.getLocalizedMessage());
        } finally {
            System.out.println("处理完成");
        }
    }
}
